<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 王宇航
  Date: 2022/4/16
  Time: 16:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
      integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
<head>
    <title>Title</title>
</head>
<body>
<form action="" method="post">
    <ol class="breadcrumb">
        <li><a href="${pageContext.request.contextPath}/QueryUserByPageServlet">主页</a></li>
        <li class="active">所有留言</li>
    </ol>
    <table class="table table-bordered table-striped">
        <tr style="background: skyblue">
            <th>ID</th>
            <th>Account</th>
            <th>Email</th>
            <th>Identity</th>
        </tr>
        <c:forEach var="user" items="${requestScope.users}" varStatus="id">
        <tr>
            <td>${id.count}
            </td>
            <td>${user.account}
            </td>
            <td>${user.email}
            </td>
            <c:if test="${user.flag==1}">
                <td>管理员</td>
            </c:if>
            <c:if test="${user.flag==0}">
                <td>员工</td>
            </c:if>
        </tr>
        </c:forEach>
    </table>
</form>
</body>
</html>
